#pragma once

#include "vrdatacore_global.h"
#include "notransformactor.h"

namespace VrDataCore
{
	class Map;

	class VRDATACORE_EXPORT EffectBase:public NoTransformActor
	{
	public:
		EffectBase();
	protected:
		virtual ~EffectBase();
	public:
		virtual void buildPropertyMap();
		virtual void onMapLoadBegin(CoreBase::Map*){}
		virtual void onMapLoadEnd(CoreBase::Map*);
		void bindingMeshDrawableActor(CoreBase::ActorBase* bindingactor);
		void removeBindingMeshDrawableActor(CoreBase::ActorBase* bindingactor);
		CoreBase::ActorBase* getBindingMeshDrawableActor();
		virtual osg::ref_ptr<CoreBase::ActorBase> clone();
		void setBindingActorId(QString id);
		QString getBindingActorId();
		bool isIdle() ;
		virtual void reset() ; 
		virtual void apply(CoreBase::ActorBase* actor);
		virtual void unApply(CoreBase::ActorBase* actor);
		virtual void pause(bool){}
	protected:
		CoreBase::ActorBase* _bindingMeshDrawableActor;
		QString _bindingMeshDrawableActorId;
		bool _effect_idle ;
	};
}